<?php

/**
 * Pregunta filter form.
 *
 * @package    cronos-doctrine
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class PreguntaFormFilter extends BasePreguntaFormFilter
{
  public function configure()
  {
      unset(
          $this['created_at'],
          $this['updated_at']
      );
      
       //Cambiar a lista y su validador de los status Activo e Inativo 0/1
      $this->widgetSchema['status'] = new sfWidgetFormChoice(array(
         'choices' => Pregunta::$status,
         'expanded' => false,
         'multiple' => false,

      ));

      $this->validatorSchema['status'] = new sfValidatorChoice(array(
          'choices' => array_keys(Pregunta::$status),

      ));
  }
  
  public function getFields()
  {
    return array(
      'id'           => 'Number',
      'categoria_id' => 'ForeignKey',
      'pregunta'     => 'Text',
      'status'       => 'ForeignKey',
      'created_at'   => 'Date',
      'updated_at'   => 'Date',
    );
  }
}
